str='hello_world'
print(str)
print('-----------')

str+=str
print('------')

str*=3
print(str)
print('---------')

# 默认是空格
str_1='1 2 3 4 5'
print(str_1.split())

str_2='1,2,3,4,5'
print(str_2.split(','))

# 合并
str_3=' '
print(str_3.join(str_2))

# 替换
str_4='hello_python'
print(str_4.replace('python','world'))


print(str_4.upper())

print(str_4.lower())


str_5='   hello_world   '
print(str_5.lstrip())
print(str_5.rstrip())
print(str_5.strip())


print('{} {} {}'.format('tang','yu','di'))

print('{} {} {}'.format('tang'.upper(),'yu'.replace('y','p'),'di'.split()))

print('{2} {1} {0}'.format('tang','yu','di'))

print('{tang} {yu} {di}'.format(tang=10 ,yu=5,di=6))

print('%s,%f,%d'%('tang',10.5,5))

